package org.codefinger.dao.impl.sql;

import org.codefinger.dao.impl.SQLVisitor;

public class OrderItem {

	private Expression	exp;

	private String		suffix;

	public OrderItem(Expression exp, boolean asc) {
		super();
		this.exp = exp;
		this.suffix = asc ? " ASC" : " DESC";
	}

	public void visit(SQLVisitor visitor) {
		exp.visit(visitor);
		visitor.appendSQL(suffix);
	}

}
